<template>
  <grid-view>
    <goods-list-item v-for="(item, index) in categoryDetail"
                     :key="index"
                     :goods-item="item"
                     @goodsItemLoad="tGoodsItemLoad(index)" />
  </grid-view>
</template>

<script>
  import GridView from 'components/common/gridView/GridView'
  import GoodsListItem from 'components/content/goods/GoodsListItem'
  export default{
    name: 'TabControlDetail',
    components: {
      GridView,
      GoodsListItem
    },
    props: {
      categoryDetail:{
        type: Array,
        default(){
          return []
        }
      },
      imgLength: 0
    },
    methods: {
      tGoodsItemLoad(index){
        if(++this.imgLength === index){
          this.$emit('tGoodsItemLoad')
        }  
      }
    }

  }
</script>

<style>
</style>
